//
//  CRJ_BaseTableView.m
//  BaseProject
//
//  Created by 小崔 on 2022/4/26.
//

#import "CRJ_BaseTableView.h"
#import <WebKit/WebKit.h>

@implementation CRJ_BaseTableView

// 适配TableViewCell上的按钮和输入框，在Table滑动的时候和点击事件冲突
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{
    if(self= [super initWithFrame:frame style:style]) {
        self.delaysContentTouches =NO;
    }return  self;
}
- (BOOL)touchesShouldCancelInContentView:(UIView*)view {
    if ([view isKindOfClass:UIButton.class]) {
        return YES;
    } else if ([view isKindOfClass:UITextField.class]) {
        return YES;
    } else if ([view isKindOfClass:UITextView.class]) {
        return YES;
    } else if ([view isKindOfClass:WKWebView.class]) {
        return YES;
    }
    return[super touchesShouldCancelInContentView:view];

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
